#pragma once

#include "dbcDefine.h"
#include "IDatabase.h"

#include <string>

using std::string;

LIBDBC_BEGIN_NAMESPACE


class DatabaseConn
{
protected:
  string    _host, _database, _user, _pwd;
  IDatabase*  _datacon;
  bool _connectionInUse, _useCredentials;
  long _started;
  
public:
  DatabaseConn(string dbms, string host, string database);
  DatabaseConn(string dbms, string host, string database, string user, string pwd);
  virtual ~DatabaseConn(void);

  /// queries and returns result set
//  IResultSet* query(string query);

  IDatabase* getConnectedDatabaseHandler();
  void markConnectionUnused();


private:
  bool queryingStart();
  bool queryingEnd();

};

LIBDBC_END_NAMESPACE
